package com.pf.publish_subscribe.controller;

import com.pf.publish_subscribe.common.RedisPubliscer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/publish/subscribe")
public class PublishSubscribeController {

    @Autowired
    private RedisPubliscer redisPubliscer;

    @GetMapping("/publishMessage")
    public void publishMessage() {
        redisPubliscer.publish();
    }
}
